import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ApiRequest from './deploy/api-request';
import methods from './deploy/methods';
import moment from 'moment';
//import wx from "weixin-jsapi"
import commonFn from './common/common'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@vant/touch-emulator'
import {
  Button,
  Form,
  Field,
  Cascader,
  CountDown,
  Overlay,
  DatetimePicker,
  ActionSheet,
  Icon,
  Loading,
  Toast,
  Picker,
  Popup,
  Checkbox,
  CheckboxGroup,
  Empty,
  Dialog,Lazyload, DropdownMenu,DropdownItem, 
  Swipe, PullRefresh,Calendar,
  SwipeItem,RadioGroup, Radio,
  Tab, Tabs ,Col, Row,Search,Divider,Uploader,List,ImagePreview,Image as VanImage
} from 'vant';
Vue.use(Lazyload);
Vue.use(methods);
Vue.use(wx)
Vue.use(Button);
Vue.use(Form);
Vue.use(Field);
Vue.use(Cascader);
Vue.use(CountDown);
Vue.use(Overlay);
Vue.use(DatetimePicker);
Vue.use(ActionSheet);
Vue.use(Icon);
Vue.use(Loading);
Vue.use(Toast);
Vue.use(Picker);
Vue.use(Popup);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Cascader);
Vue.use(Empty);
Vue.use(Dialog);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Col);
Vue.use(Row);
Vue.use(Search)
Vue.use(Divider)
Vue.use(Uploader)
Vue.use(List)
Vue.use(ImagePreview)
Vue.use(VanImage)
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(PullRefresh);
Vue.use(Calendar)
Vue.use(Radio)
Vue.use(RadioGroup);
Vue.prototype.$apiRequest = ApiRequest;
Vue.prototype.$moment = moment;
Vue.prototype.$commonFn=commonFn
Vue.use(ElementUI);
// Vue.prototype.wx = wx;

// 允许Toast存在多个
Toast.allowMultiple();

console.log('NODE环境', process.env.NODE_ENV);
console.log('API环境', process.env.VUE_APP_API_ENV);

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app');
